<?php


namespace App\Http\Requests\Customer\Enterprises;


use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

class StoreRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'name' => ['required'],
            'customer_id' => ['required', Rule::exists('customers', 'id')],
            'ebc_code' => ['required', 'size:10'],
            'ebc_name' => ['required', 'max:100'],
            'ebp_code' => ['required', 'size:10'],
            'ebp_name' => ['required', 'max:100'],
            'assure' => ['required', 'in:1,0'],
        ];
    }
}